﻿mainModule.factory("policySvc", ["$http", "BaseApiSvc", "settings", function ($http, BaseApiSvc, settings) {
    "use strict";
    var url = settings.insuranceBaseUrl + "api/policies/";
    var ChildSvc = function () {
        BaseApiSvc.call(this, url);
    };
    ChildSvc.prototype = Object.create(BaseApiSvc.prototype);
    ChildSvc.prototype.doAction = function (id, action) {
        return $http.put(this.url + id + "/state", { Action: action });
    };
    return new ChildSvc();   
}]);